﻿using BugAdmin.Core.Extension;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace BugAdmin.Api.Controllers
{
    /// <summary>
    /// 测试的控制器
    /// </summary>
    [Route("[controller]/[Action]")]
    [ApiController]
    [ApiExplorerSettings(IgnoreApi =false,GroupName =nameof(ApiVersion.V1))]
    public class TestController : ControllerBase
    {
        private ILogger<TestController> _logger;
        /// <summary>
        /// 测试控制器的构造方法
        /// </summary>
        /// <param name="logger"></param>
        public TestController(ILogger<TestController> logger)
        {
            _logger = logger;
        }
        /// <summary>
        /// 测试写日志
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public string TestLog()
        {
            _logger.LogInformation("TestController.TestLog()被调用了");
            return "TestController.TestLog()被调用了";
        }
    }
}
